---
kind: ConfigMap
apiVersion: v1
metadata:
  name: flannel
  namespace: d8-{{ .Chart.Name }}
  {{- include "helm_lib_module_labels" (list . (dict "app" "flannel")) | nindent 2 }}
data:
  cni-conf.json: |
    {
      "name": "cbr0",
      "cniVersion": "0.3.1",
      "plugins": [
        {
          "type": "flannel",
          "delegate": {
            "hairpinMode": true,
            "isDefaultGateway": true
          }
        },
        {
          "type": "portmap",
          "capabilities": {
            "portMappings": true
          }
        }
      ]
    }
  net-conf.json: |
    {
      "Network": "{{ .Values.global.discovery.podSubnet }}",
      "Backend": {
        "Type": "{{ .Values.cniFlannel.internal.podNetworkMode }}"
      }
    }
